//用户模板
/*
    {type:String,default:"大爷"}  //设置默认值
*/

const mongoose = require("../mongoConf/mongooseConf.js")

let User = new mongoose.Schema({
    username:{type:String},
    password:String,
    name:{type:String,default:"大爷"},
    age:{type:Number,default:18},
    sex:{type:String,default:""},
    tel:{type:Number,default:0},
    mail:{type:String,default:""},
    skill:[                          //子文档
        {   
            skillName:String,
            skillTime:String,
        }
    ]      
});

module.exports = mongoose.model("User",User);